home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 17588 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: linus.mitre.org!usenet
  2. From: James Roy <jroy@mitre.org>
  3. Newsgroups: comp.lang.c++
  4. Subject: Spawning a DOS command to Label a Diskette
  5. Date: 16 Apr 1996 16:44:54 GMT
  6. Organization: The MITRE Corp.
  7. Message-ID: <4l0iq6$ktc@linus.mitre.org>
  8. NNTP-Posting-Host: jroy.mitre.org
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.12(Macintosh; I; 68K)
  13. X-URL: news:comp.lang.c++
  14.  
  15. Hello,
  16. I am using the the WinExec command to label a diskette and am 
  17. experiencing different difficulties when run under Windows 95. The code 
  18. is as follows:
  19.    
  20.    sprintf(tmp,"dosprompt.pif /c Label %s%s-%1d",drive,name,disk);
  21.    err = WinExec(tmp,SW_MINIMIZED) <= 32;
  22.  
  23. the code executes as expected in 3.1 and in 95 when my application is 
  24. linked dynamicly (aside from and annoying momentary blanking of the 
  25. screen), but when linked staticly it dies at this point in Windows 95.
  26.  
  27. The application is a Borland C++ 4.52 AppExpert generated application 
  28. targetted for a Windows 16 environment.
  29.  
  30. Is there a more elegent way to Label a diskette from a Windows 
  31. application than spawning DOS?  If not, how can the annoying screen 
  32. blanking be eliminated?  At the least, does anyone have a suggestion as 
  33. to why it hangs in Windows 95?
  34.  
  35. Thank you
  36. Jim
  37. jroy@mitre.org
  38.  
  39.  
  40.